﻿using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.NetworkInformation;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp13
{
    public class Log4NetHelper
    {
        private static readonly ILog WarnLog = log4net.LogManager.GetLogger("WarnLog");
        private static readonly ILog ErrorLog = log4net.LogManager.GetLogger("ErrorLog");
        public static void Init(string configPath)
        {
            log4net.Config.XmlConfigurator.ConfigureAndWatch(new FileInfo(configPath));
        }
        public static void Warn(string message)
        {
            WarnLog.Warn(message);
        }
        public static void Error(string message)
        {
            ErrorLog.Error(message);
        }
    }
}
